import React from "react";
import { Empty } from "antd";
import { getAssetsFile } from "@/utils/common";
import "./index.less";
export const EmptyWarpper = (props) => {
  const {
    descriptionMenu,
    customDescription = false,
    noDataImg = "noData",
    noDataHttpImg = "https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg",
    imgSlot = false,
    httpImgSlot = false
  } = props;
  return (
    <div className="emptyWarpper">
      {!customDescription && !imgSlot ? (
        <Empty />
      ) : !customDescription && imgSlot ? (
        <Empty image={httpImgSlot ? noDataHttpImg : getAssetsFile(noDataImg)} />
      ) : (
        <Empty description image={httpImgSlot ? noDataHttpImg : getAssetsFile(noDataImg)}>
          {descriptionMenu}
        </Empty>
      )}
    </div>
  );
};

export default EmptyWarpper;
